class Dog {
  // 构造函数
  name: string;
  age: number;
  constructor(name: string, age: number) {
    this.name = name;
    this.age = age;
  }

  bark() {
    console.log(this);
  }
}

const dog = new Dog("吞吞", 1);
const dog1 = new Dog("吞吞1", 1);
dog.bark();
dog1.bark();
